package com.xxbb.chapter_6.dome5;

import com.xxbb.chapter_10.login_frame.LoginFrame;

import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimerTask;

public class MyThimerTask extends TimerTask {
    @Override
    public void run() {
        SimpleDateFormat format = (SimpleDateFormat) DateFormat.getDateInstance();
        format.applyPattern("yyyy-MM-dd HH:mm:ss");
        Date nowTime = Calendar.getInstance().getTime();
        System.out.println(format.format(nowTime));
    }

}
